﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class VShopInfoConfig : EntityTypeConfiguration<VShopInfo>
    {
        public VShopInfoConfig()
        {
            ToTable("Himall_VShop");           
            Property(item => item.Name).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Logo).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.BackgroundImage).HasColumnType("varchar").HasMaxLength(1000);
            Property(item => item.Description).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.Tags).HasColumnType("varchar").HasMaxLength(100);
            Property(item => item.HomePageTitle).HasColumnType("varchar").HasMaxLength(20);
            Property(item => item.WXLogo).HasColumnType("varchar").HasMaxLength(200);
            HasRequired(x => x.Himall_Shops).WithMany(x => x.Himall_VShop).HasForeignKey(x => x.ShopId);
        }
    }
}
